package com.ztgf.logistics.models.service.deppon;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.ztgf.common.constant.Result;
import com.ztgf.logistics.models.bo.deppon.LogisticsAuditBO;
import com.ztgf.logistics.models.bo.deppon.LogisticsUserBO;
import com.ztgf.logistics.models.bo.deppon.LogisticsUserSaveBO;
import com.ztgf.logistics.models.dto.deppon.LogisticsUserDTO;
import com.ztgf.logistics.models.vo.deppon.LogisticsUserVO;

import java.math.BigDecimal;

/**
 * 物流用户信息表服务
 *
 * @author mxli
 * @Date 2021-09-13 22:16:41
 */
public interface ILogisticsUserService extends IService<LogisticsUserDTO> {
    boolean add(LogisticsUserSaveBO saveBO);

    /**
     * 申请月结用户
     * @param shopId
     * @return
     */
    Result insertApply(Long shopId);


    /**
     * 修改用户金额
     * @param dto
     * @param oldDTO
     * @param logType 类型：0保证金缴纳、1保证金额退还、2扣除保证金、3设置保证金的、4设置月结用户额度、5物流下单金额（预付费）、6物流下单真实金额、7账单还款
     */
    void updateMoney(Long businessId, LogisticsUserDTO dto, LogisticsUserDTO oldDTO, BigDecimal money, int logType, Long userId, String userName);

    /**
     * 修改物流信用金
     * @param shopId
     * @param money
     * @param userId
     * @param userName
     * @return
     */
    Result updateLogisticsMoneyQuota(Long businessId, Long shopId, BigDecimal money, Long userId, String userName);

    /**
     * 分页查询
     * @param bo
     * @return
     */
    Result<Page<LogisticsUserVO>> queryPageList(LogisticsUserBO bo);

    /**
     * 审核成功
     * @param auditBO
     */
    void saveAudit(LogisticsAuditBO auditBO);

}
